package org.smartj2ee.db.driver.mysql;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.smartj2ee.db.SmartDataSource;

public class Activator implements BundleActivator {

	/*
	 * (non-Javadoc)
	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
	 */
	public void start(BundleContext context) throws Exception {
		System.out.println(context.getBundle().getLocation());
		
		
		SmartDataSource.init(com.mysql.jdbc.Driver.class);
//		DBDriverFactory.register(new IDriverLoader() {
//			
//			@Override
//			public void loadClass() throws ClassNotFoundException {
//				Class.forName("com.mysql.jdbc.Driver");
//			}
//		});
	}

	/*
	 * (non-Javadoc)
	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
	 */
	public void stop(BundleContext context) throws Exception {
		
	}
    public static void main(String[] args) {
    	System.out.println(Long.toHexString(Long.MIN_VALUE));
    	System.out.println(Long.toBinaryString(Long.MAX_VALUE));
    	System.out.println(Long.toBinaryString(Long.MIN_VALUE>>>(64-3)));
    	
    	String str="00011101";
    	System.out.println(Long.valueOf("800", 16));
    	long t=Long.MAX_VALUE;
    	
    	long val=t;//<<3;
    	System.out.println(Long.toBinaryString(val));
	}
}
